
#ifndef AWS_IOT_Publish_H
#define AWS_IOT_Publish_H

#include "core_mqtt.h"

#define pub_Length 10
#define publishName_Length (pub_Length + MAC_Length)

#include "MqttPublish_Data.h"
extern MqttPublish_Msg_S AWS_IoT_PublishMsg;

void PublishLoop(MQTTContext_t *pMqttContext);
char* PublishTopicName(void);

void cleanupOutgoingPublishWithPacketID(uint16_t packetId);
int handlePublishResend(MQTTContext_t *pMqttContext);
void cleanupOutgoingPublishes(void);

#endif
